#!/usr/bin/env bash

script_dir=`dirname "$0"`
source "${script_dir}"/common

echo
info "Removing the patch"

echo
info "Restoring game file backups"
for game_file in ${game_files[@]}
do
    if test -f "${game_file}.bak"; then
        info "Restoring ${game_file}"
        rm "${game_file}"
        mv "${game_file}.bak" "${game_file}"
    else
        warn "Backup for ${game_file} not found! Skipping"
    fi
done

echo
info "Removing the game launch script"
rm "launch.bat"

echo
info "Done"

echo
warn "The uninstaller does not remove logging servers from /etc/hosts. Please remove them manually"

echo
